<html>
<head><meta charset="utf-8"><title>cargo uninstall issues with corrupt metadata · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html">cargo uninstall issues with corrupt metadata</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216651307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216651307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216651307">(Nov 13 2020 at 18:21)</a>:</h4>
<p>Hi!</p>



<a name="216651360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216651360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216651360">(Nov 13 2020 at 18:22)</a>:</h4>
<p>(Oh. Sorry about that. Pressed enter to send...)</p>



<a name="216651410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216651410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216651410">(Nov 13 2020 at 18:22)</a>:</h4>
<p>(Writing the details, one sec)</p>



<a name="216652122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216652122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216652122">(Nov 13 2020 at 18:27)</a>:</h4>
<p>So I installed clippy with cargo, before it was available through rustup. So now that I'm cleaning things up, I wanted to uninstall it.<br>
However, I had two different installations of clippy (I'm not sure why, I must've been testing changes to clippy by compiling it manually). Thing is, cargo didn't know which one to uninstall and asked me to run <code>cargo uninstall -p &lt;spec&gt;</code>, which I did:</p>
<div class="codehilite"><pre><span></span><code>felix@felix-X550LD ~&gt; cargo uninstall clippy
error: There are multiple `clippy` packages in your project, and the specification `clippy:0.0.212` is ambiguous.
Please re-run this command with `-p &lt;spec&gt;` where `&lt;spec&gt;` is one of the following:
  file:///home/felix/Documents/Programming/Rust/clippy_work/clean_clippy#clippy:0.0.212
  file:///home/felix/Documents/Programming/Rust/rust-clippy#clippy:0.0.212
</code></pre></div>
<div class="codehilite"><pre><span></span><code>felix@felix-X550LD ~ [101]&gt; cargo uninstall -p file:///home/felix/Documents/Programming/Rust/clippy_work/clean_clippy#clippy:0.0.212
    Removing /home/felix/.cargo/bin/cargo-clippy
    Removing /home/felix/.cargo/bin/clippy-driver
</code></pre></div>
<p>So far, so good. However, after uninstalling the first one, the second one (I thought) should be unambiguous and it wasn't:</p>
<div class="codehilite"><pre><span></span><code>felix@felix-X550LD ~&gt; cargo uninstall clippy
error: corrupt metadata, `/home/felix/.cargo/bin/cargo-clippy` does not exist when it should
felix@felix-X550LD ~ [101]&gt; cargo uninstall -p file:///home/felix/Documents/Programming/Rust/rust-clippy#clippy:0.0.212

error: corrupt metadata, `/home/felix/.cargo/bin/cargo-clippy` does not exist when it should
</code></pre></div>
<p>Is this a problem?<br>
Should I ignore it?<br>
Can I fix it?<br>
What will happen with the last clippy installment that hasn't been uninstalled? x3</p>



<a name="216659014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216659014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216659014">(Nov 13 2020 at 19:18)</a>:</h4>
<p>so I think what happened is rustup installed its clippy shim, then you installed the real <code>clippy-driver</code> on top of that, then you removed the real <code>clippy-driver</code> and now there's no shim left and rustup is confused</p>



<a name="216659028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216659028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216659028">(Nov 13 2020 at 19:18)</a>:</h4>
<p>if you run <code>rustup self update</code> does it help?</p>



<a name="216664192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664192">(Nov 13 2020 at 19:51)</a>:</h4>
<p>YES!</p>



<a name="216664203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664203">(Nov 13 2020 at 19:51)</a>:</h4>
<p>That did it!</p>



<a name="216664229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664229">(Nov 13 2020 at 19:51)</a>:</h4>
<div class="codehilite"><pre><span></span><code>felix@felix-X550LD ~&gt; rustup self update
info: checking for self-updates
  rustup unchanged - 1.22.1

felix@felix-X550LD ~&gt; cargo uninstall clippy
    Removing /home/felix/.cargo/bin/cargo-clippy
</code></pre></div>



<a name="216664253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664253">(Nov 13 2020 at 19:52)</a>:</h4>
<p>:D</p>



<a name="216664286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664286">(Nov 13 2020 at 19:52)</a>:</h4>
<p>Thank you, <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="216664334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/cargo%20uninstall%20issues%20with%20corrupt%20metadata/near/216664334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/cargo.20uninstall.20issues.20with.20corrupt.20metadata.html#216664334">(Nov 13 2020 at 19:52)</a>:</h4>
<p>you're very welcome :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>